clear
capture log close
set more off

use Couples2000
keep age age_m qaugment qsex qeduc qaugment_m qsex_m qeduc_m 

keep if qaugment==0
keep if qsex==0
keep if qaugment_m==0
keep if qsex_m==0
keep if qeduc_m==0

gen agediff=age_m-age
gen adiff1=(agediff>=8)
gen adiff2=(agediff>=5&agediff<=7)
gen adiff3=(agediff>=2&agediff<=4)
gen adiff4=(agediff>=-1&agediff<=1)
gen adiff5=(agediff>=-4&agediff<=-2)
gen adiff6=(agediff>=-7&agediff<-5)
gen adiff7=(agediff<=-8)

log using Tab1_Col1Col2.log, replace
summ adiff*

log close
clear
use Couples1960
keep age age_m 

gen agediff=age_m-age
gen adiff1=(agediff>=8)
gen adiff2=(agediff>=5&agediff<=7)
gen adiff3=(agediff>=2&agediff<=4)
gen adiff4=(agediff>=-1&agediff<=1)
gen adiff5=(agediff>=-4&agediff<=-2)
gen adiff6=(agediff>=-7&agediff<-5)
gen adiff7=(agediff<=-8)

log using Tab1_Col1Col2.log, append
summ adiff*
log close






